<?php
/**
 * Created by PhpStorm.
 * User: 123
 * Date: 2020/8/10
 * Time: 11:27
 */

namespace app\http\behavior;


use think\facade\Request;

class CORSS
{
    public function run($param)
    {
        //(122);exit;
        header('Access-Control-Allow-Origin: *');
        header("Access-Control-Allow-Headers:memberid, property,token,Origin, X-Requested-With, Content-Type, Accept");
        header('Access-Control-Allow-Methods: POST,GET,OPTIONS');

        if(Request::isOptions()){
            exit();
        }

    }
}